package com.example.demo.mapper;

import com.example.demo.entity.Login;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface LoginMapper {
    @Insert("insert into login(CustomerId) values(#{CustomerId})")
    void insertLogin(String CustomerId);

    @Select("select * from login where CustomerId=#{id} order by Date desc")
    List<Login> selectLInfo(String id);

    @Delete("delete from login where LoginId=#{id}")
    void deleteLInfo(String id);

    @Select("select * from login where CustomerId=#{id} and Date like concat(#{date},'%') order by Date desc")
    List<Login> selectLiBD(String id, String date);
}
